package com.gbiac.modules.monitor.vo;

import com.gbiac.modules.monitor.entity.Seat;
import com.gbiac.modules.monitor.entity.UserCheckIn;
import com.gbiac.modules.monitor.entity.UserLeave;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.math.BigDecimal;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SeatUserVo {
    @ApiModelProperty(value = "席位id")
    private String id;
    @ApiModelProperty(value = "是否禁用;0/否；1/是；")
    @Dict(dicCode = "yn")
    private String disable;
    /**部门编码*/
    @ApiModelProperty(value = "部门编码")
    @Dict(dictTable = "sys_depart", dicCode = "org_code", dicText = "depart_name")
    private String orgCode;
    /**席位名称*/
    @ApiModelProperty(value = "席位名称")
    private String name;

    @ApiModelProperty(value = "席位当前用户信息")
    private LoginUser user;

    @ApiModelProperty(value = "席位当前用户打卡信息")
    private UserCheckIn userCheckIn;

    @ApiModelProperty(value = "在岗时长（分钟）")
    private BigDecimal duration;

    @ApiModelProperty(value = "特情列表")
    private List<UserLeave> userLeaveList;

    public SeatUserVo(Seat seat) {
        this.id = seat.getId();
        this.orgCode = seat.getOrgCode();
        this.name = seat.getName();
        this.disable = seat.getDisable();
    }
}
